using System;
using System.Collections;

namespace TimeSheetBLL
{
	/// <summary>
	/// Summary description for ClientHours.
	/// </summary>
	public class ProjectHours
	{

		private string projectName;
		private long projectID;
		private string clientName;
		private Hashtable hoursWorkedCollection;

		public ProjectHours( string name, long id )
		{
			this.projectID = id;
			this.projectName = name;
		}

		public ProjectHours()
		{

		}

		public void AddHours( DateTime dateWorked, double hours )
		{
			object o = this.hoursWorkedCollection[ dateWorked.ToShortDateString() ] as object;
			if( o == null )
			{
				this.hoursWorkedCollection.Add( dateWorked.ToShortDateString(), hours );
			}
			else
			{
				System.Double d = ( System.Double ) o;
				d = d + hours;
			}
		}

		public string ProjectName
		{
			get{ return this.projectName; }
			set{ this.projectName = value; }
		}

		public string ClientName
		{
			get{ return this.clientName; }
			set{ this.clientName = value; }
		}

		public long ProjectID
		{
			get{ return this.projectID; }
			set{ this.projectID = value; }
		}

		public Hashtable HoursWorkedCollection
		{
			get{ return this.hoursWorkedCollection; }
			set{ this.hoursWorkedCollection = value; }
		}

	}//class
}//namespace
